<template>
    <div>
        <Tabs value="name1" @on-click="tabClick">
            <TabPane label="时间区域" name="name1">
                <lyx-content :type="1" :param="param">
                    <Row>
                        <Col span="5">
                            <Input v-model="value1" placeholder="选择时间" clearable style="width: 200px" />
                        </Col>
                        <Col span="5">
                            <Input v-model="value2" placeholder="填写区县" clearable style="width: 200px" />
                        </Col>
                        <Col span="4">
                            <Button type="primary" class="lyx-mr10" @click="searchTable([value1,value2])">查询</Button>
                        </Col>
                    </Row>
                </lyx-content>
            </TabPane>
            <TabPane label="死亡原因" name="name2">
                <lyx-content :type="2" :param="param">
                    <Row>
                        <Col span="5">
                            <Input v-model="value3" placeholder="死亡原因" clearable style="width: 200px" />
                        </Col>
                        <Col span="5">
                            <Input v-model="value4" placeholder="填写区县" clearable style="width: 200px" />
                        </Col>
                        <Col span="4">
                            <Button type="primary" class="lyx-mr10" @click="searchTable([value3,value4])">查询</Button>
                        </Col>
                    </Row>
                </lyx-content>
            </TabPane>
            <TabPane label="安葬方式" name="name3">
                <lyx-content :type="3" :param="param">
                    <Row>
                        <Col span="5">
                            <Input v-model="value5" placeholder="安葬方式" clearable style="width: 200px" />
                        </Col>
                        <Col span="5">
                            <Input v-model="value6" placeholder="填写区县" clearable style="width: 200px" />
                        </Col>
                        <Col span="4">
                            <Button type="primary" class="lyx-mr10" @click="searchTable([value5,value6])">查询</Button>
                        </Col>
                    </Row>
                </lyx-content>
            </TabPane>
            <TabPane label="火化单位" name="name4" >
                <lyx-content :type="4" :param="param">
                    <Row>
                        <Col span="5">
                            <Input v-model="value7" placeholder="单位" clearable style="width: 200px" />
                        </Col>
                        <Col span="4">
                            <Button type="primary" class="lyx-mr10" @click="searchTable([value7])">查询</Button>
                        </Col>
                    </Row>
                </lyx-content>
            </TabPane>
        </Tabs>
    </div>
</template>

<script>
import LyxContent from './compoments/content/content'
export default {
  components: {
    LyxContent
  },
  data () {
    return {
      value1: '',
      value2: '',
      value3: '',
      value4: '',
      value5: '',
      value6: '',
      value7: '',
      param: []
    }
  },
  methods: {
    tabClick (e) {
      console.log(e)
    },
    searchTable (arr) {
      this.param = arr
    }
  }
}
</script>

<style scoped>

</style>
